package com.scoring.system.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.scoring.system.mapper.ComprehensiveQualityMapper;
import com.scoring.system.pojo.ComprehensiveQuality;
import com.scoring.system.service.ComprehensiveQualityService;
@Service("comprehensiveQualityService")
public class ComprehensiveQualityServiceImpl implements ComprehensiveQualityService {
	
	@Resource
	private ComprehensiveQualityMapper cqDao;

	@Override
	public int softDelete(int id) {
		return cqDao.softDelete(id);
	}

	@Override
	public int saveComprehensiveQuality(ComprehensiveQuality record) {
		return cqDao.insertSelective(record);
	}

	@Override
	public ComprehensiveQuality getComprehensiveQualityById(int id) {
		return cqDao.selectByPrimaryKey(id);
	}

	@Override
	public List<ComprehensiveQuality> listComprehensiveQualityByClassId(int classId) {
		return cqDao.listComprehensiveQualityByClassId(classId);
	}

	@Override
	public int updateComprehensiveQuality(ComprehensiveQuality record) {
		return cqDao.updateByPrimaryKey(record);
	}

	@Override
	public ComprehensiveQuality getComprehensiveQualityByStudentId(int studentId) {
		return cqDao.selectByStudentId(studentId);
	}

}
